package cn.manyufun.myf.ui.common.contact;

import cn.manyufun.myf.bean.ArticleListBean;
import cn.manyufun.myf.bean.FollowListBean;
import cn.manyufun.myf.bean.ReplyListBean;
import cn.manyufun.myf.common.base.BaseModel;
import cn.manyufun.myf.common.base.BasePresenter;
import cn.manyufun.myf.common.base.BaseView;
import rx.Observable;

/**
 * Created by Xiao on 2018-02-06.
 */

public interface CommonListContract {
    interface Model extends BaseModel {
        Observable<FollowListBean> getCommonListData(int pageIndex, int pageSize, int type);

        Observable<ReplyListBean> getComicsCommentListData(int pageIndex, int pageSize, long comicsID);

        Observable<ReplyListBean> getArticleCommentListData(int pageIndex, int pageSize, long articleID);

        Observable<ArticleListBean> getComicArticleListData(int pageIndex, int pageSize, long comicsID);
    }

    interface View extends BaseView {
        void returnCommonListData(FollowListBean newsSummaries, int type);

        void returnComicsCommentListData(ReplyListBean newsSummaries);

        void returnComicArticleListData(ArticleListBean newsSummaries);
    }

    abstract static class Presenter extends BasePresenter<CommonListContract.View, CommonListContract.Model> {
        //发起获取新闻请求
        public abstract void getCommonListDataRequest(int pageIndex, int pageSize, int type);

        public abstract void getComicsCommentListDataRequest(int pageIndex, int pageSize, long comicsId);

        public abstract void getArticleCommentListDataRequest(int pageIndex, int pageSize, long articleID);

        public abstract void getComicArticleListDataRequest(int pageIndex, int pageSize, long comicsID);
    }
}
